package com.rop.znyx.activity.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rop.znyx.activity.mapper.SecKillTimeMapper;
import com.rop.znyx.activity.service.SecKillTimeService;
import com.rop.znyx.model.activity.SecKillTime;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA
 * User: Rop
 * Date: 2023/7/11
 * Time: 9:46
 * Description:
 */

@Slf4j
@Service
@RequiredArgsConstructor
public class SecKillTimeServiceImpl extends ServiceImpl<SecKillTimeMapper, SecKillTime> implements SecKillTimeService {

    /**
     * 更新状态
     */
    @Override
    public boolean updateStatus(Long id, Integer status) {
        SecKillTime SecKillTime = new SecKillTime();
        SecKillTime.setId(id);
        SecKillTime.setStatus(status);
        return this.updateById(SecKillTime);
    }
}
